< previous page page_544 next page >

Page 544
Including the Resource File
Now that you have a finished resource file, include it in an application and see how to access the resources defined in it.
You first need to create a new project with command buttons that will display each string defined in the resource file either in a label control or in a message box. There will also be a picture control on the form to display the bitmap. Finally, the icon will be loaded so that it's displayed as part of the command button that loaded it.
Add the six command buttons, PictureBox, and Label controls to the form as shown in Figure 19.7. Then change the properties of these controls as shown in Table 19.4.
12181-0544a.gif
Figure 19.7.
Creating the Resource demo form in Visual Basic.
TABLE 19.4. SETTING THE DEMO FORM'S PROPERTIES.
ControlNameCaptionStyle
Command1cmdMsgbox1Display Msgbox #1N/A
Command2cmdMsgbox2Display Msgbox #2N/A
Command3cmdLabel1Display Label #1N/A
Command4cmdLabel2Display Label #2N/A
Command5cmdBitmapLoad BitmapN/A

(table continued on next page)

 
< previous page page_544 next page >

If you like this book, buy it!